﻿<phone:PhoneApplicationPage 
    x:Class="WeiboPlus.Shell.Views.SearchView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot is the root grid where all page content is placed Visibility="{Binding HasBindedAccount,Converter={StaticResource BoolToVisibilityConverter}}" -->
    <Grid x:Name="LayoutRoot"  Background="{StaticResource BackroundBrush}" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <!--<Rectangle x:Name="rectangle" Style="{StaticResource MainViewSpliterStyle}" RenderTransformOrigin="0.5,0.5">

        </Rectangle>-->
        <toolkit:PerformanceProgressBar x:Name="progressIndicator" IsIndeterminate="{Binding Loading}" HorizontalAlignment="Stretch" VerticalAlignment="Top"/>
        <!--Pivot Control-->
        <StackPanel Margin="20,40,20,0" Orientation="Horizontal">
            <TextBox VerticalAlignment="Top" HorizontalAlignment="Left"  Style="{StaticResource TextBoxStyle1}" Height="78" Name="tbSearchWord"   Text="{Binding SearchKeyword,Mode=TwoWay}" Width="380" Margin="-6,0,0,0"/>
            <Button Name="btnSearch" Click="btnSearch_Click"  Margin="-24,0,0,0" Background="{StaticResource PhoneAccentBrush}" BorderThickness="0">
                <Image Height="46" Width="48" Source="../Images/AppBarIcons/appbar.search.rest.png"/>
            </Button>
        </StackPanel>
        <controls:Pivot  Foreground="LightGray" Grid.Row="1"  ItemContainerStyle="{StaticResource PivotItemContainerStyle}" SelectedIndex="{Binding PivotSelectedIndex,Mode=TwoWay}"  >
            <!--Pivot item two-->
            <controls:PivotItem>
                <controls:PivotItem.Header>
                    <TextBlock Text="{Binding PivotHeaderStatus, Source={StaticResource AppResx}}" FontSize="48" Margin="0"/>
                </controls:PivotItem.Header>
                <!----> 
                <Grid Margin="0,0,10,0">
                    <ListBox x:Name="StatusGrid" ItemContainerStyle="{StaticResource ListBoxItemContainerStyle}" ItemsPanel="{StaticResource ItemsPanelTemplate1}" SelectionChanged="ContentGrid_SelectionChanged" ItemsSource="{Binding Items}"  ItemTemplate="{StaticResource StatusListDataTemplate}" />
                </Grid>
            </controls:PivotItem>
            <controls:PivotItem>
                <controls:PivotItem.Header>
                    <TextBlock Text="{Binding PivotHeaderUser, Source={StaticResource AppResx}}" FontSize="48" Margin="0"/>

                </controls:PivotItem.Header>
                <Grid>
                     <ListBox Margin="8,-2,0,0"
                    x:Name="friendList"  ItemsPanel="{StaticResource ItemsPanelTemplate1}" 
                    SelectionChanged="OnUserSelectionChanged"
                    ItemsSource="{Binding Users}"  ItemContainerStyle="{StaticResource ListBoxItemContainerStyle}" 
                    ItemTemplate="{StaticResource UserListDataTemplate}" />
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True"  IsMenuEnabled="True" Opacity=".5">
            <shell:ApplicationBar.MenuItems>
                <!--
                shell:ApplicationBarMenuItem Click="account_management_Click"  Text="账号管理" />
                <shell:ApplicationBarMenuItem Click="settingItem_Click" Text="用户设置" />
                <shell:ApplicationBarMenuItem Click="aboutItem_Click" Text="关于我们" />
                -->
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>